home *** CD-ROM | disk | FTP | other *** search
- global gDVRect, gDVExitLock
-
- on WIN_VFW_Init
- mci("capability AVIVideo can play")
- if the result = "true" then
- set vRetValue to 1
- else
- set vRetValue to 0
- end if
- set gDVRect to EMPTY
- return vRetValue
- end
-
- on WIN_VFW_Done
- end
-
- on WIN_VFW_Use aFName, aPal
- set vHWnd to gSIUtils(mGetNamedWindowHdl, "Stage")
- set gDVExitLock to the exitLock
- set the exitLock to 0
- mci("open " & aFName & ".avi type AVIVideo alias dvvid parent " & vHWnd & " style child")
- put "ZZZUse" && the result
- if aPal <> EMPTY then
- mci("set video dvvid palette handle to " & aPal)
- end if
- set the exitLock to gDVExitLock
- end
-
- on WIN_VFW_Play aFrom, aTo
- global gDVFullScreen
- set vCmd to "play dvvid from " & aFrom
- if aTo <> -1 then
- set vCmd to vCmd & " to " & aTo
- end if
- if gDVFullScreen then
- set vCmd to vCmd & " fullscreen"
- end if
- mci("set dvvid video off")
- mci("cue dvvid to " && aTo)
- mci(vCmd)
- put "ZZZPlay" && the result
- if gDVRect <> EMPTY then
- mci("put dvvid window at " & gDVRect)
- end if
- mci("set dvvid video on")
- end
-
- on WIN_VFW_Pause
- mci("pause dvvid")
- end
-
- on WIN_VFW_PauseP
- mci("status dvvid mode")
- if the result = "paused" then
- return 1
- else
- return 0
- end if
- end
-
- on WIN_VFW_Stop
- mci("stop dvvid")
- end
-
- on WIN_VFW_StopP
- mci("status dvvid mode")
- if the result = "Stopped" then
- return 1
- else
- return 0
- end if
- end
-
- on WIN_VFW_Resume
- mci("resume dvvid")
- end
-
- on WIN_VFW_SetPos aPos
- mci("seek dvvid to " & aPos)
- end
-
- on WIN_VFW_GetPos
- mci("status dvvid position")
- return value(the result)
- end
-
- on WIN_VFW_PlayP
- mci("status dvvid mode")
- if the result = "playing" then
- return 1
- else
- return 0
- end if
- end
-
- on WIN_VFW_SetPlayArea aX, aY, aW, aH
- set gDVRect to aX & " " & aY & " " & aW & " " & aH
- end
-
- on WIN_VFW_FullScreen aFlag
- global gDVFullScreen
- set gDVFullScreen to aFlag
- end
-
- on WIN_VFW_FullScreenP
- global gDVFullScreen
- return gDVFullScreen
- end
-
- on WIN_VFW_FrameRate
- mci("status dvvid nominal frame rate")
- return value(the result) / 1000
- end
-
- on WIN_VFW_Close
- mci("close dvvid")
- end
-
- on WIN_VFW_Idle
- end
-
- on WIN_VFW_Show
- mci("window dvvid state show")
- mci("set dvvid video on")
- end
-
- on WIN_VFW_Hide
- mci("window dvvid state hide")
- mci("set dvvid video off")
- mci("window dvvid state hide")
- end
-